Illustration of iterative linear solver behavior on simple 1D and 2D problems

نویسندگان

  • Nicolas Ray
  • Dmitry Sokolov
چکیده

In geometry processing, numerical optimization methods often involve solving sparse linear systems of equations. These linear systems have a structure that strongly resembles to adjacency graphs of the underlying mesh. We observe how classic linear solvers behave on this specific type of problems. For the sake of simplicity, we minimise either the squared gradient or the squared Laplacian, evaluated by finite differences on a regular 1D or 2D grid. We observed the evolution of the solution for both energies, in 1D and 2D, and with different solvers: Jacobi, Gauss-Seidel, SSOR (Symmetric successive over-relaxation) and CG (conjugate gradient [She94]). Plotting results at different iterations allows to have an intuition of the behavior of these classic solvers. Introduction When facing an optimization problem, the simplest approach is often to iterate, locally improving current solution. For example, heat diffusion can be done by iteratively replacing each value by the average value of its neighbors. With more background on numerical optimization, one would like to formulate this optimization as a linear problem. With such abstraction, it is possible to use solvers as black boxes: we do not have an interpretation of the evolution of the solution during the iterations. We are interested in observing the behavior of basic linear solvers for very simple cases. It does not necessarily impact the way to use them, but provides some intuition about the magic of linear solvers in the context of minimizing energies on a mesh. Our meshes are regular 1D and 2D grids of size n, and variables are attached to vertices. We address the coordinates of the unknown vector x as follows: in 1D xi is the i th element of x and in 2D, the value xi,j of the vertex located at the i th line and k column is the (n ∗ i + j) element of x. Our tests are performed on the minimization of two energies: • Gradient energy: The sum of squared difference between adjacent samples: Σi(xi − xi+1) in 1D and Σi,j(xi,j − xi+1,j) + Σi,j(xi,j − xi,j+1) in 2D. • Laplacian energy: The sum of squared difference between a sample and the average of its neighbors: Σi(xi−xi−1/2−xi+1/2) in 1D. In 2D, it is the same on energy for boundary vertices, and Σi,j(xi,j − xi−1,j/2 − xi+1,j/2) + (xi,j − xi,j−1/2 − xi,j+1/2) over other vertices. Note that for the Laplacian energy with the right number of constraints (2 in 1D, and 3 in 2D), the minimization of the first energy is equivalent to the minimization of the second energy. 1 1D problems Observing 1D problems allows to visualize the convergence by a 3D surface. In all figures in this section, the first axis (horizontal) represents the domain — a 1D grid, the second axis (vertical) represents the value associated to each vertex, and the third axis (depth) is the time. 1 ar X iv :1 51 0. 01 11 8v 1 [ cs .N A ] 5 O ct 2 01 5 1.1 Gradient energy The 1D grid has n vertices, here we develop the matrices for n = 5. The problem is formalized by this set of equations Ax = b :  0 −1 0 0 0 0 1 −1 0 0 0 0 1 −1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 x =  −2 0 0 6 2 6  The 4 first lines represent the objective. To enforce boundary constraints x1 = 2 and x5 = 6, we replaced coefficients applied to x1 and x5 by a contribution to the right hand side. We also add the last two lines to explicitly set x1 = 2 and x5 = 6. In the least squares sense, it produces the new system to solve A >Ax = A>b i.e.  1 0 0 0 0 0 2 −1 0 0 0 −1 2 −1 0 0 0 −1 2 0 0 0 0 0 1 x =  2 2 0 6 6  The condition number of A>A is 5.9 for n = 5, and 1000 for n = 50. These numbers are not high enough to produce numerical instabilities. This first experience (Fig. 1) shows the behavior of each solver with the same matrix. The boundary conditions (locked coordinates of x) are set in the way that the solution is the straight line defined by xi = i(xn − x1)/n. We observe the expected relative speed of convergence i.e. Jacobi < Gauss-Seidel < SSOR < Conjugate Gradient. We also visualize the impact of the order of the coordinates in Gauss-Seidel and SSOR: when only the left side is constrained (locked x1), the first iteration propagates the constraints to all coordinates whereas constraining only xn take n iteration to affect all the variables. 1.2 Laplacian energy As for the gradient energy case, the 1D grid has n vertices, and we develop the matrices for n = 5. The problem is formalized by this set of equations Ax = b :  0 2 −1 0 0 0 −1 2 −1 0 0 0 −1 2 0 1 0 0 0 0 0 0 0 0 1 x =  −2 0 6 2 6  The 3 first lines represent the objective. As for the “gradient energy”, we replaced coefficients applied to x1 and x5 by a contribution to the right hand side to enforce x1 = 2 and x5 = 6. We also add the last two lines to explicitly set x1 = 2 and x5 = 6. In least squares sense, it produces the new system to solve A>Ax = A>b i.e.  1 0 0 0 0 0 5 −4 1 0 0 −4 6 −4 0 0 1 −4 5 0 0 0 0 0 1 x =  2 4 −8 12 6  The condition number of A>A is 34.4 for n = 5, and 920000 for n = 50 coordinates. Such numbers produce numerical instabilities slowing down the solvers. In Fig. 3, we observe the same expected relative speed of convergence i.e. Jacobi < Gauss-Seidel < SSOR < Conjugate Gradient. Oscillations of the solution with Gauss-Seidel and SSOR are interesting to observe: it converges faster with higher local oscillations (in the solution space, not in the time dimension). Another interesting observation is that CG required more than 20 iterations to converge. This was unexpected because, while CG is mostly used as an iterative solver, it is also a direct solver that is supposed

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Coupling Nonlinear Element Free Galerkin and Linear Galerkin Finite Volume Solver for 2D Modeling of Local Plasticity in Structural Material

This paper introduces a computational strategy to collaboratively develop the Galerkin Finite Volume Method (GFVM) as one of the most straightforward and efficient explicit numerical methods to solve structural problems encountering material nonlinearity in a small limited area, while the remainder of the domain represents a linear elastic behavior. In this regard, the Element Free Galerkin met...

متن کامل

Equilibrium condition nonlinear modeling of a cracked concrete beam using a 2D Galerkin finite volume solver

A constitutive model based on two–dimensional unstructured Galerkin finite volume method (GFVM) is introduced and applied for analyzing nonlinear behavior of cracked concrete structures in equilibrium condition. The developed iterative solver treats concrete as an orthotropic nonlinear material and considers the softening and hardening behavior of concrete under compression and tension by using...

متن کامل

Jacobi Iterative Solution of Poisson’s Equation in 1D

This document investigates the use of a Jacobi iterative solver to compute approximate solutions to a discretization of Poisson’s equation in 1D. The document is intended as a record and guide for a particular investigation into this problem. Therefore, we specify a particular set of data that represents an instance of the Poisson equation; we discuss the form of a discretization of the equatio...

متن کامل

Finite Volume Method for 2D Linear and Nonlinear Elliptic Problems with Discontinuities

In this paper we study the approximation of solutions to linear and nonlinear elliptic problems with discontinuous coefficients in the Discrete Duality Finite Volume framework. This family of schemes allows very general meshes and inherits the main properties of the continuous problem. In order to take into account the discontinuities and to prevent consistency defect in the scheme, we propose ...

متن کامل

Comparative Performance of Frontal (Direct) and PCG (Iterative) Solver Based Parallel Computations of Finite Element Analysis

PARAM-10000 is latest of the series of High Performance Parallel Super Computers developed by India. It employs a distributed memory and message passing architectures and is built as a cluster of SMP workstations using 4-way SMP workstations from Sun Microsystems. The work discusses about Parallel Finite element Analysis Programs developed with Direct Frontal Solver and Iterative PCG (Pre-condi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1510.01118  شماره 

صفحات  -

تاریخ انتشار 2015